Skip to content

🌱 refactor: simplify scroll management and add useContainerWidth hook#1393

Open
ibolton336 wants to merge 2 commits intokonveyor:mainfrom
ibolton336:refactor/scroll-management
Open

🌱 refactor: simplify scroll management and add useContainerWidth hook#1393
ibolton336 wants to merge 2 commits intokonveyor:mainfrom
ibolton336:refactor/scroll-management

Conversation

@ibolton336
Copy link
Copy Markdown
Member

@ibolton336 ibolton336 commented May 1, 2026

Summary

Refactors the scroll management hook and adds a responsive container width hook.

Note: These changes are also included in #1389 (pluggable agent backend). This PR can merge independently — when #1389 rebases afterward, the overlap resolves cleanly.

Changes

webview-ui/src/hooks/useScrollManagement.ts:

  • Cleaner auto-scroll logic with threshold-based detection
  • Better handling of user scroll intent vs programmatic scrolls
  • Simplified state management and reduced re-renders

webview-ui/src/hooks/useContainerWidth.ts (new):

  • ResizeObserver-based hook for responsive layout breakpoints
  • Used by chat and resolution panels for adaptive layouts

Testing

  • Manual testing in extension ✅
  • No behavior change for existing scroll UX

ibolton336 added 2 commits May 1, 2026 14:26
When the LLM returns no response, log at warn level with actionable
messages instead of silly level. Helps diagnose misconfigured model
providers.

Affected nodes: AnalysisIssueFix, SummarizeHistory, PlanFixes,
FixGeneralIssues, FixJavaDependencyIssues

Signed-off-by: Ian Bolton <ibolton@redhat.com>
Refactors useScrollManagement to be more reliable:
- Cleaner auto-scroll logic with threshold-based detection
- Better handling of user scroll intent vs programmatic scrolls
- Simplified state management

Adds useContainerWidth hook for responsive layout breakpoints
in chat and resolution panels.

Signed-off-by: Ian Bolton <ibolton@redhat.com>
@ibolton336 ibolton336 requested a review from a team as a code owner May 1, 2026 18:31
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 1, 2026

Warning

Rate limit exceeded

@ibolton336 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 45 minutes and 48 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 220e40be-eee4-4364-bd9d-25f2947f3505

📥 Commits

Reviewing files that changed from the base of the PR and between 3d97606 and 3ccf9ca.

📒 Files selected for processing (4)
  • agentic/src/nodes/analysisIssueFix.ts
  • agentic/src/nodes/diagnosticsIssueFix.ts
  • webview-ui/src/hooks/useContainerWidth.ts
  • webview-ui/src/hooks/useScrollManagement.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 45 minutes and 48 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

ibolton336 added a commit to ibolton336/editor-extensions that referenced this pull request May 1, 2026
…yor#1393, konveyor#1394)

These changes are now in standalone PRs that should merge first:
- konveyor#1393 — scroll management refactor + useContainerWidth
- konveyor#1394 — ToolMessage UI refactor

Signed-off-by: Ian Bolton <ibolton@redhat.com>
@ibolton336 ibolton336 changed the title refactor: simplify scroll management and add useContainerWidth hook 🌱 refactor: simplify scroll management and add useContainerWidth hook May 1, 2026
ibolton336 added a commit to ibolton336/editor-extensions that referenced this pull request May 1, 2026
…yor#1393, konveyor#1394)

These changes are now in standalone PRs that should merge first:
- konveyor#1393 — scroll management refactor + useContainerWidth
- konveyor#1394 — ToolMessage UI refactor

Signed-off-by: Ian Bolton <ibolton@redhat.com>
ibolton336 added a commit to ibolton336/editor-extensions that referenced this pull request May 1, 2026
- Add mcpBridgeServer.ts stub (full impl in PR konveyor#1396)
- Adapt checkBatchReviewComplete to use state.mutate() API (konveyor#1386 compat)
- Revert removeListener back to removeAllListeners (KaiWorkflowEventEmitter lacks it)
- Remove duplicate fileUriToPath import in handleFileResponse
- Include useContainerWidth hook (from PR konveyor#1393)
- Include updated useScrollManagement (from PR konveyor#1393)
- Include ToolMessage with CollapsibleToolGroup/AgentToolGroup exports (from PR konveyor#1394)

Signed-off-by: Ian Bolton <ibolton@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant